home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / jaq / dist / jmgrInt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-14  |  2.6 KB  |  79 lines

  1. /*
  2.  * jmgrInt.h --
  3.  *
  4.  *    Declarations for use by the Jaquith lock manager.
  5.  *
  6.  * Copyright 1991 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that this copyright
  10.  * notice appears in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /sprite/lib/forms/RCS/jmgrInt.h,v 1.0 91/02/09 13:24:52 mottsmth Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _JMGRINT
  19. #define _JMGRINT
  20.  
  21. #define PROGNAME "jmgr"
  22. #define PROGVERSION 1
  23. #define DEF_DETAIL 0x01
  24. #define DEF_CLIENT 32                 /* cannot exceed FD_SETSIZE */
  25. #define DEF_RESET 0
  26. #define DEF_SKIPLABEL 0
  27.  
  28. #define MAXDEVICES 10
  29. #define MAXMSGLEN 80
  30.  
  31. #define MAXPORT 65535
  32. #define MAXCLIENT FD_SETSIZE
  33. #define MINCMD 0
  34. #define MAXCMD 2
  35.  
  36. #define ACTIVE_MSG "Jaquith"
  37. #define READY_MSG " READY"
  38. #define MSG_FLASH 0
  39. #define MSG_STEADY 1
  40. #define MSG_SCROLL 2
  41. #define NOVOLUME -1
  42.  
  43. typedef struct Parms {
  44.     int logDetail;            /* level of logging detail */
  45.     char *logFile;            /* logfile name */
  46.     int port;                 /* port number where server should listen */
  47.     char *devFile;            /* Device configuration file */
  48.     char *volFile;            /* Volume configuration file */
  49.     char *robot;              /* device name of robot */
  50.     int reset;                /* reset device at startup; 1=yes, do it */
  51.     int skipLabel;            /* Don't check volume label before use */
  52. } Parms;
  53.  
  54. typedef struct SDev {
  55.     int stream;               /* device's file descriptor */
  56.     int location;             /* device location in jukebox*/
  57.     char *name;               /* name of device */
  58.     int volId;                /* id num of cur volume */
  59.     struct SClient *clientPtr; /* id of current archive user */
  60.     int skipCnt;              /* number of priority skips we've allowed */
  61. } SDev;
  62.  
  63. typedef struct SClient {
  64.     T_ReqMsgHdr hdr;          /* request header */
  65.     int cmd;                  /* lock or unlock command */
  66.     int volId;                /* device id  */
  67.     int socket;               /* socket number */
  68.     int indx;                 /* slot in client table */
  69.     SDev *devPtr;             /* ptr to device info */
  70.     int retCode;              /* client condition */
  71.     char *hostName;           /* client's host for stat purposes */
  72.     char *userName;           /* client's user id for stat purposes */
  73. } SClient;
  74.  
  75. /* Global globals */
  76. extern Parms parms;
  77.  
  78. #endif /* _JMGRINT */
  79.